GraphLinksModelNodeData
A simple representation of node data for GraphLinksModel that supports property change notification, copying, and undo via the INotifyPropertyChanged, ICloneable, and IChangeDataValue interfaces.
Implements: INotifyPropertyChanged, IChangeDataValue, ICloneable
Constructors
GraphLinksModelNodeData()
The default constructor produces an empty object.
Properties
IsLinkLabel : bool
Gets or sets whether this node data represents a "label" on a link instead of a simple node.
IsSubGraph : bool
Gets or sets whether this node data represents a group or "subgraph" instead of a normal "atomic" node.
IsSubGraphExpanded : bool
Gets or sets whether this node is in the "expanded" state.
Key : T
Gets or sets the key property for this node data.
MemberKeys : IList<T>
Gets or sets a list of references to member nodes.
SubGraphKey : T
Gets or sets a reference to the containing subgraph node, if any.
WasSubGraphExpanded : bool
Gets or sets whether this node had been "expanded" when its containing group was "collapsed".
Methods
ChangeDataValue(ModelChangedEventArgs, bool)
This method implements the IChangeDataValue interface, used to perform state changes for undo and redo.
- e
- an edit describing the change to be performed
- undo
- true if undoing; false if redoing
ConvertNodeKeyToString(T) : string
Convert a key value to a string.
- key
Returns: a String from which String) can recover the original key value
LoadFromXElement(XElement)
Initialize this node data with data held in a Linq for XML XElement.
- e
- the XElement
MakeXElement(XName) : XElement
Constructs a Linq for XML XElement holding the data of this node.
- n
- the name of the new XElement
Returns: an initialized XElement
RaisePropertyChanged(string, object, object)
Call this method from property setters to raise the PropertyChanged event.
- pname
- the property name
- oldval
- the value before the property was set
- newval
- the new value
Events
PropertyChanged : PropertyChangedEventHandler
This event implements the INotifyPropertyChanged interface, so that both the model and the dependency object system can be informed of changes to property values.